package net.oschina.kjtang.qywx.common.service;

import net.oschina.kjtang.qywx.common.entity.Entity;
import net.oschina.kjtang.qywx.common.exception.RCodeException;

import java.util.List;

/**
 * Created by kjtang on 2017/12/1.
 * 业务基类
 */
public interface BaseService<T extends Entity> {

    /**新增实体信息*/
    public void add(T entity) throws RCodeException;

    /**修改实体信息*/
    public void modify(T entity) throws RCodeException;

    /**删除实体信息*/
    public void delete(T entity) throws RCodeException;

    /**查询单个实体信息*/
    public T get(T entity) throws RCodeException;

    /**查询多个实体信息*/
    public List<T> getList(T entity) throws RCodeException;
}
